{if $full_page}
<!-- $Id: user_account_list.htm 17030 2010-02-08 09:39:33Z sxc_shop $ -->
{include file="pageheader.htm"}
{insert_scripts files="../js/utils.js,listtable.js"}
<script type="text/javascript" src="../js/calendar.php"></script>
<script type="text/javascript" src="js/jPicker/jquery-1.4.4.min.js"></script> 
<link href="../js/calendar/calendar.css" rel="stylesheet" type="text/css" />
<div class="form-div">
  <form action="javascript:searchUser()" name="searchForm">
    <img src="images/icon_search.gif" width="25" height="22" border="0" alt="SEARCH" />
    {$lang.user_id} <input type="text" name="keyword" size="10" />
      <select name="process_type">
        <option value="-1">{$lang.process_type}</option>
        <option value="0" {$process_type_0}>{$lang.surplus_type_0}</option>
        <option value="1" {$process_type_1}>{$lang.surplus_type_1}</option>
      </select>
      <select name="payment">
      <option value="">{$lang.pay_mothed}</option>
      {html_options options=$payment_list}
      </select>
      <select name="is_paid">
        <option value="-1">{$lang.status}</option>
        <option value="0" {$is_paid_0}>{$lang.unconfirm}</option>
        <option value="1" {$is_paid_1}>{$lang.confirm}</option>
        <option value="2">{$lang.cancel}</option>
      </select>
	  	<!-- 新增y-6.28时间 开始-->
	
	 <span style="margin:10px 10px;"> 
      <input type="text" class="time" name="start_date" maxlength="60" size="20" readonly="readonly" id="start_time_id" />
      <input name="start_time_btn" type="button" id="start_time_btn" onclick="return showCalendar('start_time_id', '%Y-%m-%d %H:%M', '24', false, 'start_time_btn');" value="{$lang.btn_select}" class="button"/>
      ~      
      <input type="text" class="time" name="end_date" maxlength="60" size="20" readonly="readonly" id="end_time_id" />
      <input name="end_time_btn" type="button" id="end_time_btn" onclick="return showCalendar('end_time_id', '%Y-%m-%d %H:%M', '24', false, 'end_time_btn');" value="{$lang.btn_select}" class="button"/>
	  <span id="qingchu" class="button Y-dele" onclick="">清除</span>
	 </span>
	<!-- 新增y-6.28提现时间 结束-->
	  
      <input type="submit" value="{$lang.button_search}" class="button" />

  </form>

</div>



<form method="POST" action="" name="listForm">
<!-- start user_deposit list -->
<div class="list-div" id="listDiv">
{/if}
<table cellpadding="3" cellspacing="1">
  <tr>
    <th><a href="javascript:listTable.sort('user_name', 'DESC'); ">{$lang.user_id}</a>{$sort_user_name}</th>
    <th><a href="javascript:listTable.sort('add_time', 'DESC'); ">{$lang.add_date}</a>{$sort_add_time}</th>
    <th><a href="javascript:listTable.sort('process_type', 'DESC'); ">{$lang.process_type}</a>{$sort_process_type}</th>
    <th><a href="javascript:listTable.sort('amount', 'DESC'); ">{$lang.surplus_amount}</a>{$sort_amount}</th>
    <th><a href="javascript:listTable.sort('payment', 'DESC'); ">{$lang.pay_mothed}</a>{$sort_payment}</th>
    <th><a href="javascript:listTable.sort('is_paid', 'DESC'); ">{$lang.status}</a>{$sort_is_paid}</th>
    <th>{$lang.admin_user}</th>
    <th>{$lang.handler}</th>
  </tr>
  {foreach from=$list item=item}
  <tr>
    <td>{if $item.user_name}{$item.user_name}{else}{$lang.no_user}{/if}</td>
    <td align="center">{$item.add_date}</td>
    <td align="center">{$item.process_type_name}</td>
    <td align="right">{$item.surplus_amount}</td>
    <td>{if $item.payment}{$item.payment}{else}N/A{/if}</td>
    <td align="center">{if $item.is_paid}{$lang.confirm}{else}{$lang.unconfirm}{/if}</td>
    <td align="center">{$item.admin_user}
    <td align="center">
    {if $item.is_paid}
    <a href="user_account.php?act=edit&id={$item.id}" title="{$lang.surplus}"><img src="images/icon_edit.gif" border="0" height="21" width="21" /></a>
    {else}
    <a href="user_account.php?act=check&id={$item.id}" title="{$lang.check}"><img src="images/icon_view.gif" border="0" height="21" width="21" />
    <a href="javascript:;" onclick="listTable.remove({$item.id}, '{$lang.drop_confirm}')" title="{$lang.drop}" ><img src="images/icon_drop.gif" border="0" height="21" width="21" /></a>
    {/if}
    </td>
  </tr>
  {foreachelse}
  <tr>
    <td class="no-records" colspan="8">{$lang.no_records}</td>
  </tr>
  {/foreach}

<table id="page-table" cellspacing="0">
<tr>

  <td><!-- 导出订单功能开始 this.form.target = '_blank'-->
	<span class="button Y-dele" onclick="exports();">导出订单</span>
	<!-- 导出订单功能结束 --></td>
  <td align="right" nowrap="true">

  {include file="page.htm"}
  </td>
</tr>
</table>
{if $full_page}
</div>
  
<!-- end user_deposit list -->
</form>

<script type="text/javascript" language="JavaScript">
listTable.recordCount = {$record_count};
listTable.pageCount = {$page_count};
{foreach from=$filter item=item key=key}
listTable.filter.{$key} = '{$item}';
{/foreach}
{literal}
<!--

onload = function()
{
    // 开始检查订单
    startCheckOrder();
}
/**
 * 搜索用户
 */
function searchUser()
{
    listTable.filter['keywords'] = Utils.trim(document.forms['searchForm'].elements['keyword'].value);
    listTable.filter['process_type'] = document.forms['searchForm'].elements['process_type'].value;
    listTable.filter['payment'] = Utils.trim(document.forms['searchForm'].elements['payment'].value);
    listTable.filter['is_paid'] = document.forms['searchForm'].elements['is_paid'].value;

		
	//Y-6.30 新增 
	listTable.filter['start_date'] = document.forms['searchForm'].elements['start_date'].value;
	listTable.filter['end_date'] = document.forms['searchForm'].elements['end_date'].value;
	
	
	
    listTable.filter['page'] = 1;
    listTable.loadList();
}

/*20170628  YZ */
	function exports(){
	  
	  /*获取搜索框的值*/
	    var keyword = Utils.trim(document.forms['searchForm'].elements['keyword'].value);
		
        var process_type = document.forms['searchForm'].elements['process_type'].value;
		var payment =Utils.trim(document.forms['searchForm'].elements['payment'].value);
        var is_paid = document.forms['searchForm'].elements['is_paid'].value;
		
		/*新增*/
		var start_date = document.forms['searchForm'].elements['start_date'].value;
		
		var end_date = document.forms['searchForm'].elements['end_date'].value;
		
	   /*链接组合*/
	   var urls = "export.php?act=account_export&keyword="+keyword+"&process_type="+process_type+"&payment="+payment+"&is_paid="+is_paid+"&start_date="+start_date+"&end_date="+end_date;
	   
	   /*跳转链接*/
	   /*window.location.href = urls; */
	     window.open(urls);
	
	}



/**
 * 清除所选时间
 */
$(function(){ 
		function qingchu(id,clas){
		
		 $('#'+id).click(function(){  
		 
		 $('.'+clas).val(""); 

		});
		}
			qingchu('qingchu','time');

	  }); 
//-->
</script>
{/literal}
{include file="pagefooter.htm"}
{/if}